<template>
	<view class="popup">
		<view class="popupbag"></view>
		<view class="popupbody">
			<view class="popupbody-view">
				<image class="popupbody-view-image" src="../../static/questions/dui.png"></image>
				<view class="popupbody-view-title">{{info.name}}</view>
				<view class="popupbody-view-time">祝贺您用时{{timer}}秒完成！</view>
				<view class="popupbody-view-record" @click="urlClick('/pages/record/details?id='+questions_user_id)">查看答题记录</view>
				<view class="popupbody-view-flex">
					<view class="popupbody-view-flex-1" @click="urlClick('/pages/index/index')">返回首页</view>
					<view class="popupbody-view-flex-2 padding" v-if="info.xia_id > 0"  @click="urlClick('/pages/questions/questions?id='+info.xia_id)">下一题</view>
					
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props:['info','timer','questions_user_id','is_date'],
		data() {
			return {
			
			}
		},
		methods :{
			urlClick(e){
				console.log(e);
				if(e=='/pages/index/index'){
					uni.switchTab({
						url: e
					})
				}else{
					e = e+'&is_date='+this.is_date
					uni.navigateTo({
						url:e
					})
				}
				
			}
		}
	}
</script>

<style lang="less">
	.popup {
		color: #333;
		.popupbody {
			width: 600rpx;
			min-height: 640rpx;
			border-radius: 30rpx;
			background-color: #fff;
			position: fixed;
			top: 0;left: 0; right: 0;
			margin: auto;
			margin-top: 20%;
			z-index: 1000;
			padding-bottom: 30rpx;
			.popupbody-view {
				padding: 20rpx;
				margin-top: 20rpx;
				.popupbody-view-image {
					width: 160rpx;
					height: 160rpx;
					display: block;
					margin: auto;
				}
				.popupbody-view-title {
					text-align: center;
					line-height: 120rpx;
					font-size: 38rpx;
				}
				.popupbody-view-time {
					text-align: center;
					font-size: 36rpx;
				}
				.popupbody-view-record {
					margin-top: 40rpx;
					text-align: center;
					line-height: 80rpx;
					color: #fff;
					border-radius: 10rpx;
					background-color: #3eb8ff;
				}
				.popupbody-view-flex {
					display: flex;
					margin-top: 40rpx;
					view {
						height: 80rpx;
						line-height: 80rpx;
						flex : 1;
						text-align: center;
						border-radius: 10rpx;
					}
					.popupbody-view-flex-1 {
						border: 2rpx solid #3eb8ff;
						color: #3eb8ff;
						
					}
					.popupbody-view-flex-2 {
						background-color: #3eb8ff;
						color: #fff;
					}
					.padding {
						margin-left: 20rpx;
					}
				}
			}
		}
		.popupbag {
			width: 100%;
			height: 100%;
			position: fixed;
			top: 0;
			z-index: 990;
			background-color: #0c0c0c61;
		}
	}
</style>